//
//  TKIMImageHelper.h
//  TKIM
//
//  Created by liupm on 15/8/10.
//  Copyright (c) 2015年 liupm. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface TKIMImageHelper : NSObject


/**
 *  @Author lpm, 15-10-27 14:10:22
 *
 *  @brief  截指定区域的屏幕
 *
 *  @param rect
 *  @param view
 *
 *  @return
 */
+ (UIImage *)screenshotWithRect:(CGRect)rect  view:(UIView *)view;


/**
 *  @Author lpm, 15-11-11 17:11:46
 *
 *  @brief  旋转相机图片的方向
 *
 *  @param aImage
 *
 *  @return
 */
+ (UIImage *)fixOrientation:(UIImage *)aImage;


/**
 *  @Author lpm, 15-11-18 17:11:42
 *
 *  @brief  修改图片颜色
 *
 *  @param maskColor
 *  @param image
 *
 *  @return 
 */
+ (UIImage *)imageMaskedWithColor:(UIColor *)maskColor image:(UIImage *)image;


/*!
 *
 *  压缩图片至目标尺寸
 *
 *  @param sourceImage 源图片
 *  @param targetWidth 图片最终尺寸的宽
 *
 *  @return 返回按照源图片的宽、高比例压缩至目标宽、高的图片
 */
+ (UIImage *)compressImage:(UIImage *)sourceImage toTargetWidth:(CGFloat)targetWidth;


/*!
 *
 *  压缩图片至屏幕尺寸
 *
 */
+ (UIImage *)compressImage:(UIImage *)sourceImage;


/**
 *  @Author lpm, 16-10-21 15:10:22
 *
 *  @brief  截视频的图
 *
 *  @param videoPath 视频路径
 *  @param callBack  回调
 */
+(void)captureVideoImage:(NSString *)videoPath callBack:(void(^)(UIImage *image))callBack;


@end
